#include "tcpserve.h"
#include<mythread.h>
#include"tcpsocket.h"
#include<QString>
#include"mainwidget.h"

Tcpserve::Tcpserve(QWidget *parent) :QTcpServer(parent)
{
}

void Tcpserve::incomingConnection(qintptr socketdescriptor)
{


    myThread *thread = new myThread(0,socketdescriptor);

    connect(thread,SIGNAL(finished()),thread,SLOT(deleteLater()));
    thread->start();

}
void Tcpserve::socketdiscon()
{
    qDebug()<<"duankai";
}

